﻿using System;
using System.Collections.Generic;
using System.Text;
using Sinacor.Infra.UI.Controls.SmartClient;

namespace Sinacor.UI.Application.Menu.SmartClient
{
    public class FavoriteSubMenuItem : SinacorMenuItem
    {
        private string _assembly;
        private string _className;
        private string _moduleName;
        private string _itemName;
        private string _role;        
        private int? _companyId;
        private FavoriteMenuItem _parentMenu;

        public FavoriteSubMenuItem(string assembly, string className, string moduleName, string itemName, FavoriteMenuItem parent, string iconName, string role)
        {
            _assembly = assembly;
            _className = className;
            _moduleName = moduleName;
            _itemName = itemName;
            _parentMenu = parent;
            SetResourceReference(FavoriteSubMenuItem.IconProperty, iconName);
            //SetResourceReference(FavoriteSubMenuItem.HeaderProperty, itemName);
            Header = FindResource(moduleName) + " - " + FindResource(itemName);
            IconName = iconName;
            MenuRole = role;
        }

        public string Assembly
        {
            get { return _assembly; }
            set { _assembly = value; }
        }

        public string ClassName
        {
            get { return _className; }
            set { _className = value; }
        }

        public string ModuleName
        {
            get { return _moduleName; }
            set { _moduleName = value; }
        }

        public string ItemName
        {
            get { return _itemName; }
            set { _itemName = value; }
        }

        public int? CompanyId
        {
            get { return _companyId; }
            set { _companyId = value; }
        }

        public string MenuRole
        {
            get { return _role; }
            set { _role = value; }
        }

        public FavoriteMenuItem ParentMenu
        {
            get { return _parentMenu; }
            set { _parentMenu = value; }
        }
    }
}